package com.ljsw.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.ljsw.activity.R;

import java.util.ArrayList;

/**
 * Created by lianchao on 2017/11/10.
 */

public class ZhouZhuanAdapter extends BaseAdapter {

    private ArrayList<String> LockID;
    private Context mContext;

    public ZhouZhuanAdapter(ArrayList<String> LockID, Context mContext) {
        super();
        this.LockID = LockID;
        this.mContext = mContext;
    }


    @Override
    public int getCount() {
        return LockID.size();
    }

    @Override
    public Object getItem(int position) {
        return LockID.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder mviewHolder = null;
        if (mviewHolder == null) {
            mviewHolder = new ViewHolder();
            convertView = LayoutInflater.from(mContext).inflate(R.layout.saomiao_list_item, null, false);
            TextView tv = (TextView) convertView.findViewById(R.id.cardtext);
            mviewHolder.tv = tv;
            convertView.setTag(mviewHolder);
        } else {
            mviewHolder = (ViewHolder) convertView.getTag();
            convertView.setTag(mviewHolder);
        }
        return convertView;
    }


    class ViewHolder {
        private TextView tv;


    }
}
